﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using MasterDetailTemplate.Services;
using MasterDetailTemplate.Services.impl;
using Moq;

namespace MasterDetailTemplateTest.Helper
{
    public static class DietRecorderStorageServiceTestHelper
    {
        public static async Task<IDietRecorderStorageService> GetInitializedDietRecorderStorage() {
            var preferenceMocked = new Mock<IPreferenceStorage>();
            var mockedPreference = preferenceMocked.Object;
            IDietRecorderStorageService dietRecorderStorageService =
                new DietRecorderStorageService(mockedPreference);
            await dietRecorderStorageService.InitializeAsync();
            return dietRecorderStorageService;
        }
    }
}
